
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.game-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

h1 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: bold;
}

.score, .high-score {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#gameCanvas {
    border: 3px solid #4a5568;
    border-radius: 10px;
    background: #2d3748;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    margin: 20px 0;
}

.game-controls {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
}

button {
    padding: 12px 25px;
    font-size: 1.1em;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#startBtn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

#pauseBtn {
    background: linear-gradient(45deg, #ff9800, #f57c00);
    color: white;
}

#resetBtn {
    background: linear-gradient(45deg, #f44336, #d32f2f);
    color: white;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
}

.game-over {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    z-index: 1000;
}

.game-over h2 {
    color: #e53e3e;
    margin-bottom: 15px;
    font-size: 2em;
}

.game-over p {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: #4a5568;
}

#restartBtn {
    background: linear-gradient(45deg, #38a169, #2f855a);
    color: white;
    padding: 15px 30px;
    font-size: 1.2em;
}

.instructions {
    margin-top: 30px;
    text-align: left;
    background: rgba(74, 85, 104, 0.1);
    padding: 20px;
    border-radius: 15px;
}

.instructions h3 {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.instructions p {
    margin: 5px 0;
    color: #666;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .game-container {
        padding: 20px;
        margin: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 350px;
        height: auto;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .game-controls {
        flex-wrap: wrap;
    }
}
